<script setup>
import {useRoute} from 'vue-router'

const route = useRoute()

console.log("路由参数:",route.params.username)
console.log("查询参数:",route.query.limit)
</script>

<template>
<div>
    <h2>用户明细信息</h2>
    <p>
        用户名id: {{ $route.params.id }}
        所在城市：{{ $route.query.city }}
    </p>
</div>
</template>